import track from "../../effect/track";
import { TrackOpTypes } from "../../utils";

const ownKeysHandler: ProxyHandler<object>["ownKeys"] = (target) => {
  // 依赖收集
  track(target, TrackOpTypes.ITERATE);

  const result = Reflect.ownKeys(target);
  return result;
};

export default ownKeysHandler;
